Skip to content

Adds support for Apex classes (Salesforce) #29

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 7, 2018

Conversation

kevinohara80
Copy link
Contributor

Currently, Salesforce developers cannot use CodeClimate despite CodeClimate having PMD as a plugin. This is because the PMD plugin filters out all files that are not Java (.java). This patch allows for the Apex class extension to be processed as well (.cls).

Related to #26

@filipesperandio filipesperandio merged commit 5455b68 into codeclimate:master Nov 7, 2018
@oded-rosi-samanage
Copy link

oded-rosi-samanage commented Nov 29, 2018

Hey @kevinohara80 , Unfortunately we were using the pmd module in CodeClimate and it stopped working after this merge. right now I can read the issue is that the .cls file is missing from the project, although they exist in the repo (just referenced to another place in the project).
engine

After some reading i got to the ApexMetrics module, which should be discontinued shortly
It seemed to be working for over 6 months (at least) on the apex classes in git, without using the ApexMetrics module (I wasn't even aware of it).

Please advice

@filipesperandio
Copy link
Contributor

Hey @oded-rosi-samanage, if I understood the problem correctly, I believe you could fix the problem by adding an exclude_pattern configuration to you .codeclimate.yml config.
You can add any kind of exclusion for an specific plugin, it could be all .cls files, or specific ones (for example, files causing problems by referring to others not reachable by the analysis):

plugins:
  pmd:
    enabled: true
    exclude_patterns:
      - "**/*.cls"

@oded-rosi-samanage
Copy link

Thanks for the quick answer @filipesperandio , it does work as expected

KroArtem pushed a commit to KroArtem/codeclimate-pmd that referenced this pull request Jan 13, 2021
Currently, Salesforce developers cannot use CodeClimate despite CodeClimate having PMD as a plugin. This is because the PMD plugin filters out all files that are not Java (.java). This patch allows for the Apex class extension to be processed as well (.cls).

Related to codeclimate#26
KroArtem pushed a commit to KroArtem/codeclimate-pmd that referenced this pull request Jan 13, 2021
Currently, Salesforce developers cannot use CodeClimate despite CodeClimate having PMD as a plugin. This is because the PMD plugin filters out all files that are not Java (.java). This patch allows for the Apex class extension to be processed as well (.cls).

Related to codeclimate#26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants